home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / umich / utils / break.arc / README < prev   
Text File  |  1989-03-28  |  4KB  |  94 lines

  1. The following program, when placed in the AUTO folder or started by hand,
  2. lets you interrupt any program (except the desktop).
  3. The corresponding binary is sent to the moderator of comp.binaries.atari.st.
  4. The program was assembled and linked with the assembler and linker from the
  5. GST-C compiler.
  6.  
  7. For correspondence conceirning this program (bugs, questions etc.) try
  8.  
  9.       L. J. M. de Wit
  10.       Nachtegaallaan 7
  11.       5731XP Mierlo
  12.       Holland
  13.       e-mail: ..!mcvax!philmds!leo
  14.               (or perhaps  ..!hp4nl!philmds!leo)
  15.  
  16. The following program, when placed in the AUTO folder or started by hand,
  17. lets you interrupt any program (except the desktop).
  18. This posting consists of a manual page and a uuencoded program.
  19. The corresponding source is sent to the moderator of comp.sources.atari.st.
  20.  
  21. For correspondence conceirning this program (bugs, questions etc.) try
  22.  
  23.       L. J. M. de Wit
  24.       Nachtegaallaan 7
  25.       5731XP Mierlo
  26.       Holland
  27.       e-mail: ..!mcvax!philmds!leo
  28.               (or perhaps  ..!hp4nl!philmds!leo)
  29.  
  30. ----------------------------- start of manual page ----------------------------
  31.   NAME
  32.      break - stop current program on receipt of interrupt character
  33.  
  34.   SYNTAX
  35.      break [-e|-d|-z] [-i|-c<code>]
  36.  
  37.   DESCRIPTION
  38.      After installing break, any program can be interrupted.
  39.      This is achieved by 'extending' the existing keyboard interrupt
  40.      routine: after executing the old code the break character check
  41.      is done.
  42.  
  43.      The various flags have the following meaning:
  44.         e(nable) : the current break character will end the program.
  45.                    the code returned is -32, what seems to be the standard
  46.                    value for programs interrupted by ^C in GEMDOS.
  47.         d(isable): no actions are done; this restores the old behaviour
  48.         z(ero)   : the current break character will be discarded (made 0)
  49.                    in the input buffer; this can be used to disable ^C.
  50.         i(nput)  : the break character is prompted for. Combinations with
  51.                    shift, control and alternate keys are also allowed.
  52.                    Useful for specifying the break character interactively.
  53.         c(ode)   : specifies the break character as a hexadecimal code.
  54.                    The hex code must follow the 'c' flag immediately.
  55.                    Useful for specifying the break character from a script.
  56.      Of the flags e,d and z only one should be used; e is the default.
  57.      Also, of the flags i and c only one should be used; control-delete is
  58.      the default. This is done on purpose; you can always change it to ^C
  59.      if you want to (or whatever key you like).
  60.       
  61.      The break program can be reused indefinitely, because a next invocation
  62.      is not made memory resident; it only modifies parameters in the first
  63.      invocation (the resident one).
  64.  
  65.      The program can be placed into the \AUTO folder to be installed
  66.      automatically, or activated 'by hand'. If placed in the \AUTO folder, it
  67.      should of course have a .PRG extension (break.prg); as \AUTO folder
  68.      programs don't get arguments, the break will be enabled and the break
  69.      character is control-delete in this case.
  70.  
  71.   BUGS/SHORTCOMINGS
  72.      A nice extension would be the possibility to catch the interrupt from
  73.      a user program; this could be achieved by using a new trap. As this
  74.      implies restoring the old interrupt catch routine when the program
  75.      exits, and maybe also core dumps could be added to the action of an
  76.      (other) interrupt character, such a more general signal mechanism is
  77.      not added (yet). Gives me time to think of a nice implementation 8-).
  78.  
  79.   JOKE
  80.      Gimme a break, huh?!
  81.  
  82. [This is a new version of Leo de Wit's "break" program, recently posted.
  83.  It avoids the use of undocumented locations, so should be compatible with
  84.  all versions of TOS. -sg]
  85.  
  86. Here is the source to your break.s, as modified by me.  There is no
  87. command line option to change the default hard-break key -- I'm just
  88. lazy, I guess.
  89.  
  90. Opinions expressed above do not necessarily    -- Allan Pratt, Atari Corp.
  91. reflect those of Atari Corp. or anyone else.      ...ames!atari!apratt
  92.  
  93.  
  94.